  import axios from "@/API/axios/axios";
import { pa } from "element-plus/es/locales.mjs";
  // 定义床位数据类型
  export interface Bed {
    bedId: string;
    buildingNo: string;
    roomNo: string;
    floorNo: string;
    bedNo: string;
    assignedUserGender: string;
    price: number;
  }
  //床位信息数组
  export interface BedInfo {
    buildingNo?: string;
    floorNo: string;
    roomNo: string;
    bedNo?: number;
    price?: number;
  }[]


  // 添加床位信息API
  export function addBed(bedInfo: BedInfo[]) {
    return axios.post('/stay/addBed', bedInfo);
  }
  // 获取所有床位信息API
  export function getAllBeds(){
    return axios.get('/stay/getAllBeds');
  }
  // 删除床位
  export function deleteBedAPI(bedId: string) {
    return axios.delete('/stay/deleteBed', { params:{bedId} });
  }
  //筛选床位
  export function screenBeds(screenBed: BedInfo){
    return axios.get('/stay/screenBeds',{ params:screenBed });
  }
